#!perl

my $out = $ARGV[0];
my $csv = $ARGV[1];

open(DEVICE_OUT, "<$out");
open(DEVICE_CSV, ">$csv");
while (<DEVICE_OUT>)
{
	chomp $_;
	if ($_ =~ /^\(\d+/)
	{
		next;
	}
	if ($_ eq "")
	{
		next;
	}
	$_ =~ s/NULL//g;
	print DEVICE_CSV $_;
	print DEVICE_CSV "\n";
}
close(DEVICE_CSV);
close(DEVICE_OUT);
